package com.example.homecunter.news.newsapi;

import com.example.common.utils.BaseEntity;
import com.example.homecunter.news.newsentity.NewsEntity;
import com.example.homecunter.news.newsentity.NewsType;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.Query;

public interface NewsApi {
    @GET("api/NewsType/getAllTypes")
    Observable<BaseEntity<List<NewsType>>> getType();

    @GET("api/News/getNews")//newstype=1&pagenum=1&pagesize=20
    Observable<BaseEntity<List<NewsEntity>>> getNews(@Query("newstype")String newstype,@Query("pagenum")String pagenum,@Query("pagesize")String pagesize);

}
